package com.example.mybatis.service;

import com.example.mybatis.mapper.UserInfoMapper;
import com.example.mybatis.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserInfoMapper userInfoMapper;

    public List<UserInfo> getAllUser() {
        return userInfoMapper.selectAll();
    }

    public UserInfo getAllUserInfoById1(Integer id) {
        return userInfoMapper.selectAllById1(id);
    }

    public List<UserInfo> getAllUserInfoById2(Integer id) {
        return userInfoMapper.selectAllById2(id);
    }
}
